package com.yiren.backstage.communication.api.impl;

import android.content.Context;

import com.yiren.backstage.communication.api.AbstractCommunication;
import com.yiren.backstage.communication.services.impl.SocketPortServiceImpl;
import com.yiren.backstage.currency.constant.DeviceConnectTypeConstant;

/**
 * Time:2021/12/23 14:45
 * Author:xiaozan
 * Description:socket通讯api 实现
 */
public class SocketCommunicationApiImpl extends AbstractCommunication {

    private static SocketCommunicationApiImpl socketCommunicationApi;

    public static SocketCommunicationApiImpl getInstance(Context context) {
        if (null == socketCommunicationApi) {
            socketCommunicationApi = new SocketCommunicationApiImpl(context);
        }
        return socketCommunicationApi;
    }

    public SocketCommunicationApiImpl(Context context) {
        super(context, DeviceConnectTypeConstant.TYPE_SOCKET);
        abstractPortService = new SocketPortServiceImpl();
    }
}
